﻿@using StarBlog.Share.Extensions
@model Photo
@{
    // var imageSrc = @Url.Action("GetThumb", "Photo", new {id = Model.Id, width = 300});
    var imageSrc = "media/photography/" + Model.FilePath.Replace("\\", "/") + "?width=300";
}

<div class="card">
    <img class="bd-placeholder-img card-img-top" alt="@Model.Title" src="@imageSrc">

    <div class="card-body">
        <h5 class="card-title">
            <a class="stretched-link" asp-controller="Photography" asp-action="Photo" asp-route-id="@Model.Id">
                @Model.Title.Limit(8)
            </a>
        </h5>
        <div class="card-text d-flex justify-content-between small">
            <span>@Model.Location.Limit(8)</span>
            <span>
                @Model.CreateTime.ToShortDateString()
                @Model.CreateTime.ToShortTimeString()
            </span>
        </div>
    </div>
</div>